<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddCarsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('cars', function (Blueprint $table) {
            $table->text('images')->nullable()->comment('行驶证照片');
            $table->string('vin')->nullable()->comment('车架号');
            $table->string('plate_number')->nullable()->comment('车牌号');
            $table->string('owner')->nullable()->comment('车主');
            $table->string('engine_number')->nullable()->comment('引擎号');
            $table->string('address')->nullable()->comment('地址');
            $table->string('vehicle_type')->nullable()->comment('车型：小型普通客车');
            $table->string('model')->nullable()->comment('车辆标题:大众汽车牌SVW6666DFD');
            $table->string('register_date')->nullable()->comment('注册时间');
            $table->string('issue_date')->nullable()->comment('注册时间');
            $table->string('use_character')->nullable()->comment('用途:非营运');
            $table->timestamp('vci_end')->nullable()->comment('商业险结束时间');
            $table->timestamp('tci_end')->nullable()->comment('交强险结束时间');
            $table->timestamp('mots_end')->nullable()->comment('年检结束时间');
            $table->float('mileage', 10, 2)->default(0.00)->comment('公里数');
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
